package com.wangyk.oauth2.pojo;

import org.springframework.security.core.userdetails.User;
import org.springframework.stereotype.Component;

import java.util.Collections;

public class MyUserDetails extends User
{
    private com.wangyk.oauth2.pojo.User user;

    public MyUserDetails(com.wangyk.oauth2.pojo.User user)
    {
        super(user.getUserName(), user.getPassword(), true, true, true, true, Collections.EMPTY_SET);
        this.user = user;
    }

    public com.wangyk.oauth2.pojo.User getUser()
    {
        return user;
    }

    public void setUser(com.wangyk.oauth2.pojo.User user)
    {
        this.user = user;
    }
}
